We start by making a normal resource pack and after that we make a new directory: assets/minecraft/holdmyitems inside the directory we can make a file named item_addon.lua and open it with your favorite text editor, i suggest either Zed, Notepad++, i advise to not use VScode on low-end systems since it’s quite heavy otherwise it’s another good text editor.
let’s see an example
-- if we have a enchanted book in our hand
if (I:isOf(context.item, Items:get("minecraft:enchanted_book"))) then
M:moveX(context.matrices, -20) -- we move it on the X axis by -20
M:moveY(context.matrices, 0.04) -- we move it on the Y axis by 0.04
M:moveZ(context.matrices, 0.15) -- we move it on the Z axis by 0.015
end